#include "head.h"
int net_mkdir(request_t * request, int net_fd){
    
    char full_path[1024] = {0};
    getcwd(full_path, sizeof(full_path));
    strcat(full_path, "/");
    strcat(full_path, request->user_name);
    strcat(full_path, "/");
    strcat(full_path, request->path);
    strcat(full_path, "/");
    strcat(full_path, request->args);

    printf("%s\n",full_path);

    response_t response;
    memset(&response, 0, sizeof(response));

    if (mkdir(full_path, 0755) == -1) {
        response.status = 1;
    } else {
        response.status = 0;
    }

    send(net_fd, &response, sizeof(response), 0);
}
